package com.cnap.multiclouldmgmt.model.microSvc;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.Date;

/**
 * 内存使用的情况
 *
 * @author xc
 **/
@ApiModel(value = "com.cnap.multiclouldmgmt.model.microSvc.GpuTempUseModel",description = "gpu温度情况")
public class GpuTempUseModel {

    //集群ip
    @ApiModelProperty(value = "集群ip")
    private String k8sClusterIp;

    //pod所属的svc的名称
    @ApiModelProperty(value = "服务名称")
    private String svcName;

    //容器名称
    @ApiModelProperty(value = "容器名称")
    private String podName;

    //mem使用率
    @ApiModelProperty(value = "gpu温度")
    private int gpuTemp;

    //记录时间
    @ApiModelProperty(value = "记录时间")
    private Date recordTime;


    //记录时间
    @ApiModelProperty(value = "记录时间tamp")
    private long recordTimestamp;


    /**
     * get
     *
     * @return RecordTimestamp
     */
    public long getRecordTimestamp() {
        if (recordTime != null) {
            recordTimestamp = recordTime.getTime();
        }
        return recordTimestamp;
    }

    /**
     * set
     *
     * @param recordTimestamp recordTimestamp
     */
    public void setRecordTimestamp(long recordTimestamp) {
        this.recordTimestamp = recordTimestamp;
    }

    /**
     * get
     *
     * @return K8sClusterIp
     */
    public String getK8sClusterIp() {
        return k8sClusterIp;
    }

    /**
     * set
     *
     * @param k8sClusterIp k8sClusterIp
     */
    public void setK8sClusterIp(String k8sClusterIp) {
        this.k8sClusterIp = k8sClusterIp;
    }

    /**
     * get
     *
     * @return SvcName
     */
    public String getSvcName() {
        return svcName;
    }

    /**
     * set
     *
     * @param svcName svcName
     */
    public void setSvcName(String svcName) {
        this.svcName = svcName;
    }

    /**
     * get
     *
     * @return PodName
     */
    public String getPodName() {
        return podName;
    }

    /**
     * set
     *
     * @param podName podName
     */
    public void setPodName(String podName) {
        this.podName = podName;
    }

    /**
     * get
     *
     * @return GpuTemp
     */
    public int getGpuTemp() {
        return gpuTemp;
    }

    /**
     * set
     *
     * @param gpuTemp gpuTemp
     */
    public void setGpuTemp(int gpuTemp) {
        this.gpuTemp = gpuTemp;
    }

    /**
     * get
     *
     * @return RecordTime
     */
    public Date getRecordTime() {
        if(recordTimestamp != 0l){
            recordTime = new Date(recordTimestamp);

        }

        return recordTime;
    }

    /**
     * set
     *
     * @param recordTime recordTime
     */
    public void setRecordTime(Date recordTime) {
        this.recordTime = recordTime;
    }
}
